package com.lifeng.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;


/**
 * Created by lifeng on 2019/5/28.
 */
@Controller
public class UserController {

    @RequestMapping("/")
    public String loginUI(){
        return "login";
    }

    @RequestMapping("/login")
    public String login(Model model, String name, String password){
        model.addAttribute("userid",name);
        return "chat";
    }

    @RequestMapping("/topicchat")
    public String topicchat(){
        return "topicchat";
    }
}
